import {Entity, PrimaryGeneratedColumn, Column, ManyToOne, BaseEntity} from 'typeorm';
import { User } from './user.entity';

@Entity()
export class Order extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    sn: string;

    @ManyToOne(() => User)
    user: User;

    @Column()
    totalAmount: number;

    @Column()
    payAmount: number;

    @Column()
    payChannel: number;

    @Column()
    payTime: Date;

    @Column()
    source: number;

    @Column()
    type: number;

    @Column()
    status: number;
}
